/*
package com.rw.config;

import com.alibaba.druid.pool.DruidDataSource;
import com.rw.pojo.JdbcProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

*/
/**
 * 方法二
 * 注入属性
 *//*

@Configuration
@EnableConfigurationProperties(JdbcProperties.class)
public class JdbcConfig02 {

    @Bean
    public DataSource getDataSource(JdbcProperties jdbc){
        DruidDataSource druidDataSource = new DruidDataSource();
        druidDataSource.setDriverClassName(jdbc.getDriverClassName());
        druidDataSource.setUrl(jdbc.getUrl());
        druidDataSource.setUsername(jdbc.getUsername());
        druidDataSource.setPassword(jdbc.getPassword());
        return druidDataSource;
    }
}
*/
